let userModel = require('../../models/user.js')
let klassModel = require('../../models/klass.js')

function showBindClassView(source) {
  var show = false,that = source
  if (userModel.showClassPassword()) {
    show = true
    wx.showShareMenu({
      withShareTicket: true
    })
  }else {
    wx.hideShareMenu({
    })
  }

  that.setData({
    showBindClass:show,
    password:klassModel.getCurrentClass().password
  })
  
  return show
}

module.exports = {
  showBindClassView: showBindClassView
}